package com.can.common.constant;

/**
 * @Description 返回枚举
 * @Author can
 * @Date 2018/8/28
 * @Version 1.0
 */
public enum JsonResultEnum {
    // 服务器内部错误
    SERVER_ERROR(-1, "系统繁忙，请稍后再试。"),
    // 请求成功
    SUCCESS(5000,"请求成功"),
    // 执行操作出错
    EXECUTE_ERROR(5001, "执行操作出错"),
    // 请求参数验证出错
    VALIDATE_PARAM_ERROR(5002, "请求参数验证出错"),
    // 权限验证出错
    UNAUTHORIZED_ERROR(5003, "你的权限不够"),
    // 用户名或者密码不正确
    ACCOUNT_PASSWORD_ERROR(5004, "用户名或者密码不正确"),
    // 未登录
    NO_LOGIN_ERROR(5005, "未登录"),
    ;

    private Integer code;
    private String msg;

    JsonResultEnum(Integer code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
